import request from '@/utils/request'

export function listCombination(pos, size, conditions) {
  return request({
    url: '/combination/list',
    params: {
      'pos': pos,
      'size': size,
      'conditions': conditions
    },
    method: 'get'
  })
}
export function delCombination(combinationmodel) {
  return request({
    url: '/combination/del',
    data: combinationmodel,
    method: 'post'
  })
}
export function delCombinations(jsonCombinationModel) {
  return request({
    url: '/combination/bulkdel',
    data: {
      data: jsonCombinationModel
    },
    method: 'post'
  })
}

export function setCombination(combinationmodel, combinationdetail) {
  return request({
    url: '/combination/set',
    data: {
      main: JSON.stringify(combinationmodel),
      detail: JSON.stringify(combinationdetail)
    },
    method: 'post'
  })
}
export function get(id) {
  return request({
    url: '/combination/get',
    params: {
      'id': id
    },
    method: 'get'
  })
}
